package com.xingli.zhajinhua.beans;


import com.xingli.zhajinhua.beans.enums.GameStatus;

/**
 * 场次记录
 */
public class EventRecord {
    private String eventId;
    private int[] allCount;
    private int countDown;
    private GameStatus gameStatus;

    public EventRecord() {
    }

    public EventRecord(String eventId, int[] allCount, int countDown, GameStatus gameStatus) {
        this.eventId = eventId;
        this.allCount = allCount;
        this.countDown = countDown;
        this.gameStatus = gameStatus;
    }

    public void reset(int countDown){
        for (int i = 0; i < allCount.length; i++) {
            allCount[i] = 0;
        }
        this.countDown = countDown;
        this.gameStatus = GameStatus.Start;
    }
    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    public int[] getAllCount() {
        return allCount;
    }

    public void setAllCount(int[] allCount) {
        this.allCount = allCount;
    }

    public int getCountDown() {
        return countDown;
    }

    public void setCountDown(int countDown) {
        this.countDown = countDown;
    }

    public int reduceCountDown() {
        return --countDown;
    }

    public void addAllBetCount(int count, int arrIndex) {
        allCount[arrIndex] += count;
    }

    public GameStatus getGameStatus() {
        return gameStatus;
    }

    public void setGameStatus(GameStatus gameStatus) {
        this.gameStatus = gameStatus;
    }
}
